﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Plugin;
using StandardFramework;
using PolarExpress.View.Interfaces;

namespace PolarExpress.View
{
    public partial class CtrlEventView : UserControl, IEventView
    {
        public event EventHandler<EventViewEventArgs> EventItemSelected;

        public event EventHandler<EventViewEventArgs> EventItemReleased;

        public class RoutePoint
        {
            public int G;
            public int H;

            public Point Position;

            public RoutePoint Parent;
        }

        public CtrlEventView()
        {
            InitializeComponent();
        }

        //public void AddInstance(Plugin.Plugin plugin, Point position)
        //{
        //    BaseComponent comp = plugin.Assembly.CreateInstance(plugin.Type.FullName) as BaseComponent;

        //    // REC: Construct an avatar as the visual
        //    // representation of the entity:
        //    ComponentAvatar avatar = new ComponentAvatar();

        //    avatar.Position = position;

        //    this.Invalidate();
        //}

    }

    public class EventViewEventArgs : EventArgs
    {
        private ComponentAvatar _avatar;

        public ComponentAvatar Avatar { get { return _avatar; } }

        public EventViewEventArgs(ComponentAvatar avatar)
        {
            _avatar = avatar;
        }
    }
}
